﻿<Core:DXWindow x:Class="ThanNhanTao.frmDmChanDoan"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:Core="clr-namespace:DevExpress.Xpf.Core;assembly=DevExpress.Xpf.Core.v11.1"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:local="clr-namespace:ThanNhanTao"
        dxc:ThemeManager.ThemeName="Office2007Blue" Icon="/ThanNhanTao;component/Images/iconbv48x48.ico"
        Title="Danh mục chẩn đoán" Height="550" Width="780" WindowState="Maximized">
    <Core:DXWindow.Resources>
        <Style TargetType="Label">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style TargetType="dxe:TextEdit">
            <Setter Property="Margin" Value="2,2" />
        </Style>
        <Style TargetType="dxe:ComboBoxEdit">
            <Setter Property="Margin" Value="2,2" />
        </Style>
    </Core:DXWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="150"></RowDefinition>
            <RowDefinition Height="200*"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
        </Grid.RowDefinitions>
        <GroupBox Header="Thông tin loại yêu cầu">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="28"></RowDefinition>
                    <RowDefinition Height="28"></RowDefinition>
                    <RowDefinition Height="28"></RowDefinition>
                    <RowDefinition Height="28"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="10"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Content="Mã chẩn đoán:" Foreground="Red"></Label>
                <dxe:TextEdit Grid.Column="1" Name="txtMa" TabIndex="1" FontWeight="Bold" 
                              KeyUp="txtMa_KeyUp"  Validate="txtMa_Validate"
                              InvalidValueBehavior="AllowLeaveEditor" CausesValidation="False"/>
                <Label Content="Tên chẩn đoán:" Grid.Row="1" Foreground="Red"></Label>
                <dxe:TextEdit Grid.Row="1" Grid.Column="1" Name="txtTen" TabIndex="2" KeyUp="txtTen_KeyUp"
                              InvalidValueBehavior="AllowLeaveEditor" Validate="txtTen_Validate"
                              CausesValidation="False"/>
                <Label Content="Ghi chú:" Grid.Row="2"></Label>
                <dxe:TextEdit Grid.Row="2" Grid.Column="1" Name="txtGhiChu" TabIndex="3" KeyUp="txtGhiChu_KeyUp"/>
                <Label Content="Kích hoạt:" Grid.Row="3" Grid.Column="0"></Label>
                <dxe:CheckEdit Name="ckbKichHoat" TabIndex="4" Grid.Row="4" Grid.Column="1" IsChecked="True" 
                               Checked="ckbKichHoat_Checked" Unchecked="ckbKichHoat_Unchecked"/>
            </Grid>
        </GroupBox>
        <dxg:GridControl Name="grid" Grid.Row="1" >
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="MaChanDoan" ReadOnly="True" Header="Mã chẩn đoán" />
                <dxg:GridColumn FieldName="TenChanDoan" Header="Tên chẩn đoán" ReadOnly="True" />
                <dxg:GridColumn FieldName="GhiChu" Header="Ghi chú" ReadOnly="True"/>
                <dxg:GridColumn FieldName="KichHoat" Header="Kích hoạt" ReadOnly="True"/>
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TableView Name="tbv" ShowGroupPanel="False" AutoWidth="True" MouseDoubleClick="tbv_MouseDoubleClick" 
                               NavigationStyle="Row" ShowAutoFilterRow="True"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
        <Grid Background="#FFC9E8F6" Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="4" />
                <RowDefinition Height="30" />
                <RowDefinition Height="4" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="281*" />
                <ColumnDefinition Width="80" />
                <ColumnDefinition Width="8" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="8" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="8" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="8" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="3" />
            </Grid.ColumnDefinitions>
            <Button Name="btnThemMoi" Content="_Thêm mới" Grid.Column="1" Grid.Row="1" Click="btnThemMoi_Click" IsEnabled="False"  />
            <Button Name="btnLuu" Click="btnLuu_Click" Content="_Lưu" Grid.Column="3" Grid.Row="1" IsEnabled="False" />
            <Button Name="btnDong" Click="btnDong_Click" Content="Đó_ng" Grid.Column="9" Grid.Row="1"/>
            <Button Name="btnXoa" Click="btnXoa_Click" Content="_Xóa" Grid.Column="7" Grid.Row="1" IsEnabled="False"/>
            <Button Name="btnHuyBo" Click="btnHuyBo_Click" Grid.Row="1" Content="_Hủy bỏ" Grid.Column="5" IsEnabled="False"></Button>
        </Grid>
        
    </Grid>
</Core:DXWindow>
